package kd.bos.openapi.sdk.response.result;

/**
 * @Deacription 请求结果
 * @author johnz
 * @date 2022年4月6日
 */
public class Result<T> {
	private int code;
	
	private String message;
	
	private T data;

	public static Result createRequest(int code, String message){
		Result requestQuery = new Result(code, message);
		return requestQuery;
	}


	public Result of(T data) {
		this.data = data;
		return this;
	}

	public Result(int code, String message) {
		this.code = code;
		this.message = message;
	}

	public Result(int code, String message, T data) {
		this(code, message);
		this.data = data;
	}


	public int getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

	public T getData() {
		return data;
	}

}
